package lt.egidijus.aatest.popup.actions;

import lt.egidijus.aatest.utils.Constants;
import lt.egidijus.aatest.wizards.NewAATestWizard;

import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbenchWizard;

import com.android.ide.eclipse.adt.internal.wizards.actions.NewTestProjectAction;

@SuppressWarnings("restriction")
public class NewAATestAction extends NewTestProjectAction{
	
    @Override
    protected IWorkbenchWizard instanciateWizard(IAction action) {
		if (Constants.clickTestProject){
			Display.getDefault().asyncExec(new Runnable() {
				public void run() {
					MessageDialog.openError(null, "Create project error", "Create new test project can't on selected test project!");
				}
			});
			return null;
		}
        return new NewAATestWizard();
    }
    
    

}
